package com.appkubes.mall.restful.application.wx.service.impl;

import com.appkubes.common.utils.data.date.DateUtils;
import com.appkubes.mall.core.entity.MallPayRecord;
import com.appkubes.mall.core.service.impl.BaseMallPayRecordServiceImpl;
import com.appkubes.mall.restful.application.wx.dao.PayRecordDao;
import com.appkubes.mall.restful.application.wx.service.PayRecordService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Date;
import java.util.List;

@Service
public class PayRecordServiceImpl extends BaseMallPayRecordServiceImpl implements PayRecordService {

    @Resource
    PayRecordDao payRecordDao;

    public List<MallPayRecord> queryAll(String queryStr) {
        return payRecordDao.getList(queryStr);
    }

    public Boolean add(MallPayRecord record) {
        record.setCreateTime(DateUtils.DateToTimestamp(new Date()));
        record.setUpdateTime(DateUtils.DateToTimestamp(new Date()));
        record.setAppKey(null);
        return this.save(record);
    }





}
